package it.blueocean.acanto.taglibrary.jsp.taglib.tags;

import it.blueocean.acanto.taglibrary.jsp.taglib.tags.exceptions.MalformedPropertyExpressionException;

public class StateBeanPropertyLocator
{
	private StateBeanLocator beanLocator_;

	private String propertyName_;

	public StateBeanPropertyLocator(String paramString1, String paramString2)
	{
		this.beanLocator_ = new StateBeanLocator(paramString1);
		this.propertyName_ = paramString2;
	}

	public StateBeanPropertyLocator(String paramString) throws MalformedPropertyExpressionException
	{
		int i = paramString.indexOf(".");
		if(i == -1)
			throw new MalformedPropertyExpressionException(paramString);
		this.beanLocator_ = new StateBeanLocator(paramString.substring(0, paramString.lastIndexOf(".")));
		this.propertyName_ = paramString.substring(paramString.lastIndexOf(".") + 1);
	}

	public String getPropertyName()
	{
		return this.propertyName_;
	}

	public void setPropertyName(String paramString)
	{
		this.propertyName_ = paramString;
	}

	public StateBeanLocator getBeanLocator()
	{
		return this.beanLocator_;
	}

	public void setBeanLocator(StateBeanLocator paramStateBeanLocator)
	{
		this.beanLocator_ = paramStateBeanLocator;
	}

	public void setBeanLocator(String paramString)
	{
		this.beanLocator_ = new StateBeanLocator(paramString);
	}

	public String toString()
	{
		return this.beanLocator_ + " --> " + this.propertyName_;
	}
}
